package com.xx.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author lotey
 * @since 2024-04-21 21:18
 */
@Getter
@Setter
@TableName("t_chat_record")
@Schema(name = "ChatRecord", description = "")
public class ChatRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    private Long id;

    @Schema(description = "发送用户ID")
    private Long fromId;

    @Schema(description = "接收ID")
    private Long toId;

    @Schema(description = "接收类型；0：用户；1：群组；2：聊天室")
    private String toType;

    @Schema(description = "发送时间")
    private LocalDateTime sendTime;

    @Schema(description = "消息类型；0：普通消息；1：二进制消息")
    private String msgType;

    @Schema(description = "文本消息")
    private String textContent;

    @Schema(description = "二进制消息")
    private byte[] binaryContent;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;
}
